package com.wxboot.game.eliminate.modules.service.strategy;


import com.wxboot.game.eliminate.base.JellyType;
import org.springframework.stereotype.Component;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Component
public class BombStrategyRegistry {

    private static final Map<JellyType, BombStrategy> BOMB_STRATEGY_MAP = new ConcurrentHashMap<>();

    public static void registerBombStrategy(JellyType jellyType, BombStrategy bombStrategy) {
        BOMB_STRATEGY_MAP.put(jellyType, bombStrategy);
    }

    public static BombStrategy getBombStrategy(JellyType jellyType) {
        return BOMB_STRATEGY_MAP.get(jellyType);
    }

}
